package cn.com.mall.product.web.controller;

import cn.com.mall.product.web.service.ICacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class CacheController {

    @Autowired
    ICacheService cacheService;

    @RequestMapping("testCache")
    public Map<String,String> getData(){
        return cacheService.getData();
    }

    @RequestMapping("deleteCache")
    public void deleteData(){
         cacheService.deleteData();
    }
}
